﻿
<!DOCTYPE html>
<html>
  <head>
    <title>收货地址</title>
    <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
">

 <link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.1/style/weui.min.css">
<link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css">
<script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/city-picker.min.js"></script>
<style type="text/css">
  
  body, html {
  height: 100%;
  -webkit-tap-highlight-color: transparent;
}
.demos-title {
  text-align: center;
  font-size: 34px;
  color: #3cc51f;
  font-weight: 400;
  margin: 0 15%;
}

.demos-sub-title {
  text-align: center;
  color: #888;
  font-size: 14px;
}

.demos-header {
  padding: 35px 0;
}

.demos-content-padded {
  padding: 15px;
}

.demos-second-title {
  text-align: center;
  font-size: 24px;
  color: #3cc51f;
  font-weight: 400;
  margin: 0 15%;
}

footer {
  text-align: center;
  font-size: 14px;
  padding: 20px;
}

footer a {
  color: #999;
  text-decoration: none;
}
</style>

  </head>

  <body ontouchstart>


    <header class='demos-header'>
      <h1 class="demos-title">收货地址</h1>
    </header>
   
    
    
    <div class="weui-cells__title">基本资料</div>
    
    
    

    <div class="weui-cell">
    <div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
    <div class="weui-cell__bd">
      <input class="weui-input" type="text" id="name"  value="{$t.name}" placeholder="请输入收货人姓名">
    </div>
  </div>
   <div class="weui-cell">
    <div class="weui-cell__hd"><label class="weui-label">电话</label></div>
    <div class="weui-cell__bd">
      <input class="weui-input" type="text" id="tel"  value="{$t.tel}" placeholder="请输入您的电话">
    </div>
  </div>

  <div class="weui-cell">
    <div class="weui-cell__hd"><label class="weui-label">请选择</label></div>
    <div class="weui-cell__bd">
      <input class="weui-input csx" type="text" id='city-picker'  value="{$t.csx}" readonly="readonly" placeholder="请选择地区">
    </div>
  </div>

  <div class="weui-cell">
    <div class="weui-cell__hd"><label class="weui-label">街道地址</label></div>
    <div class="weui-cell__bd">
      <input class="weui-input" type="text" id="address"  value="{$t.address}" placeholder="请填写详细地址">
    </div>
  </div>

    
  <div class="weui-cell">
    
  </div>

  


    
    

    

   

    
    

    

    <div class="weui-btn-area">
      <a class="weui-btn weui-btn_primary" onclick="hx()" id="showTooltips">保存</a>
      <a href="{:url('index')}" class="weui-btn weui-btn_warn">返回</a>
    </div>
    <script>
  $("#city-picker").cityPicker({
    title: "请选择收货地址"
  });
</script>
<script type="text/javascript">
  
function hx(){

var data={name:$('#name').val(),
          tel:$("#tel").val(),
          address:$("#address").val(),
          csx:$("#city-picker").val()

         }

$.post(" ",data,function(res){

 if(res.code==200){
  
  $.alert("保存成功", function() {
  window.location.href="{:url('index')}";
});

 }else{
$.alert('保存失败');

 }


});


}

</script>
 
  </body>
</html>
